import React, { useState } from 'react'
import { View,Text } from '@tarojs/components'

// 引入Taro UI的样式
import "./SearchHeader.scss";

interface SearchHeaderProps {
  title: string
}

const SearchHeader: React.FC<SearchHeaderProps> = ({
  title,
}) => {
  const [searchValue, setSearchValue] = useState('')

  const handleChange = (value) => {
    setSearchValue(value)
    return value
  }

  const handleActionClick = () => {
    console.log('开始搜索:', searchValue)
  }

  return (
    <View className='search-header'>
      <View className='title-section'>
        <Text onClick={handleActionClick}>{title}</Text>
      </View>
    </View>
  )
}

export default SearchHeader